package com.nd.android.payment.business.http;

import com.common.android.utils.httpRequest.AutoLoginHttpRequest;
import com.common.android.utils.httpRequest.IHttpRequest;
import com.product.android.business.ApplicationVariable;
import com.product.android.business.config.Configuration;

/**
 * 用于支付
 * 
 * <br>Created 2014-11-10 上午11:00:30
 * @version  
 * @author   zhangqr		
 *
 * @see
 */
public class PayHttpRequest {

	private static IHttpRequest _payInstance;	// 定义自己的instance,用父类的在某些特殊情况可能导致转型错误
	 
    /**
     * 创建实例
     * 
     * <br>Created 2014-11-10 上午11:00:19
     * @param ctx
     * @param appid
     * @param type
     * @return
     * @author       zhangqr
     */
    public static IHttpRequest getInstance() {
        if (_payInstance == null) {
            _payInstance = AutoLoginHttpRequest.getInstance(
                    ApplicationVariable.INSTANCE.applicationContext,Configuration.OAP_APPID,1);
            _payInstance.setAgent(new MiddleRequestHeader());
        }
        return _payInstance;
    }
    
}
